1300 |
Is it possible to cancel or discard the values during validation
// ValidateValue event - Occurs before user changes the cell's value. void OnValidateValueG2antt1(long Item,long ColIndex,VARIANT NewValue,BOOL FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ValidateValue" ); OutputDebugStringW( L"NewValue" ); OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ); OutputDebugStringW( L"The DiscardValidateValue restores back the previously values." ); spG2antt1->DiscardValidateValue(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutCauseValidateValue(EXG2ANTTLib::exValidateCell); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXG2ANTTLib::DateType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); spG2antt1->EndUpdate(); |
1299 |
Is it possible to validate the values of the cells only when user leaves the focused item
// ValidateValue event - Occurs before user changes the cell's value. void OnValidateValueG2antt1(long Item,long ColIndex,VARIANT NewValue,BOOL FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ValidateValue" ); OutputDebugStringW( L"NewValue" ); OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ); Cancel = VARIANT_TRUE; OutputDebugStringW( L"You can not leave the item/record until the Cancel is False." ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutCauseValidateValue(EXG2ANTTLib::exValidateItem); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXG2ANTTLib::DateType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); spG2antt1->EndUpdate(); |
1298 |
We would like to validate the values of the cells. Is it possible
// ValidateValue event - Occurs before user changes the cell's value. void OnValidateValueG2antt1(long Item,long ColIndex,VARIANT NewValue,BOOL FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ValidateValue" ); OutputDebugStringW( L"NewValue" ); OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value." ); Cancel = VARIANT_TRUE; OutputDebugStringW( L"You can not leave the cell until the Cancel is False." ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutCauseValidateValue(EXG2ANTTLib::exValidateCell); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXG2ANTTLib::DateType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text"); spG2antt1->EndUpdate(); |
1297 |
Is there any way to add auto-numbering
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Items"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column->PutFormatColumn(L"1 pos ''"); var_Column->PutPosition(0); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); |
1296 |
How can I format my column to display the percent values “5,00%”
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Percent")))->PutFormatColumn(L"((dbl(value) * 100) format '2|,|3.')+'%'"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(double(0.5)); var_Items->AddItem(double(0.4)); var_Items->AddItem(double(0.75)); |
1295 |
I can't control bar's transparency if the bar is overlaid. What can be done
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutOverlaid(EXG2ANTTLib::exOverlaidBarsTransparent,long(0)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing); var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarTransparent,long(80)); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A3",vtMissing); var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarTransparent,long(50)); |
1294 |
How can I show the child items with no identation
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside); spG2antt1->PutIndent(12); spG2antt1->PutHasLines(EXG2ANTTLib::exThinLine); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->InsertItem(h,vtMissing,"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->InsertItem(h,vtMissing,"Child 3"); |
1293 |
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
|
1292 |
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside); spG2antt1->PutIndent(12); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->InsertItem(h,vtMissing,"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->InsertItem(h,vtMissing,"Child 3"); |
1291 |
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
|
1290 |
Is there other ways of showing the hierarchy lines (exGroupLinesInside)
|
1289 |
Is there other ways of showing the hierarchy lines (exGroupLines)
|
1288 |
How can I specify non-working dates for any year, as a repetitive expression for instance
|
1287 |
Is it possible to specify the Easter and a day after as being non-working
|
1286 |
Here's a simple sample to compute the Easter day
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Year")))->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::SpinType); var_Editor->PutNumeric(EXG2ANTTLib::exInteger); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Easter")))->PutComputedField(_bstr_t("date(dateS('3/1/' + int(%0)) + ((1:=(((255 - 11 * (int(%0) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((int(%0) +") + " int(int(%0) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(long(2008)); var_Items->AddItem(long(2009)); var_Items->AddItem(long(2010)); var_Items->AddItem(long(2011)); spG2antt1->EndUpdate(); |
1285 |
How do I specify the Easter or holydays as non-working
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAdjustLevelsToBase(VARIANT_TRUE); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2011,4,14,0,00,00).operator DATE()); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutNonworkingDays(0); var_Chart->AddNonworkingDate("month(value) = 7"); var_Chart->AddNonworkingDate(_bstr_t("not(month(value) in (3,4)) ? 0 : ( floor(value)=floor(date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19") + ")) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7)" + ")))"); |
1284 |
Is it possible to add a repetitive expression to define non-working dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->AddNonworkingDate(COleDateTime(2010,1,13,0,00,00).operator DATE()); var_Chart->AddNonworkingDate("month(value) = 1 and (day(value) in (1,6))"); |
1283 |
How do I get the Easter date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Easter")))->PutFormatColumn(_bstr_t("date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((") + "year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(COleDateTime(1989,1,1,0,00,00).operator DATE()); var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->AddItem(COleDateTime(2002,1,1,0,00,00).operator DATE()); var_Items->AddItem(COleDateTime(2003,1,1,0,00,00).operator DATE()); var_Items->AddItem(COleDateTime(2010,1,1,0,00,00).operator DATE()); |
1282 |
How can I calculate the number of visible units
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void OnClickG2antt1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); OutputDebugStringW( L"UnitCount:" ); OutputDebugStringW( _bstr_t(var_Chart->GetCountVisibleUnits(var_Chart->GetDateFromPoint(0,-1),var_Chart->GetDateFromPoint(1,-1))) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); |
1281 |
Is it possible to specify the nonworking up to minutes and I can see when using the inside zoom feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutLevelCount(3); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutUnitWidth(16); var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelNoLine); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(2); var_Level->PutUnit(EXG2ANTTLib::exMinute); var_Level->PutCount(60); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute); var_Chart->PutResizeUnitCount(15); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat(); var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exMinute); var_InsideZoomFormat->PutInsideCount(15); var_InsideZoomFormat->PutInsideLabel(L"<%nn%>"); var_InsideZoomFormat->PutOwnerLabel(L"Hour: <b><%h%>"); var_InsideZoomFormat->PutDrawGridLines(VARIANT_TRUE); var_Chart->GetInsideZooms()->Add(COleDateTime(2010,1,1,12,00,00).operator DATE()); var_Chart->GetInsideZooms()->Add(COleDateTime(2010,1,1,13,00,00).operator DATE()); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,9,00,00).operator DATE()); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Non-Working")))->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,_bstr_t("weekday(value) case (default:((timeF(value)>=\"12:30:00\" and timeF(value) <=\"14:00:00\" ));5:( timeF(value)>=\"12:30:00\" and") + " timeF(value) <=\"13:30:00\" );6:1;0:1) "); h = var_Items->AddItem("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,_bstr_t("weekday(value) case (default:((timeF(value)>=\"10:45:00\" and timeF(value) <=\"13:45:00\" ));5:( timeF(value)>=\"10:45:00\" and") + " timeF(value) <=\"14:30:00\" );6:1;0:1) "); h = var_Items->AddItem("2:30 to 9:30 on Friday, Saturday and Sunday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) case (default:((timeF(value)>=\"02:30:00\" and timeF(value) <=\"09:30:00\" ));1:0;2:0;3:0;4:0) "); spG2antt1->EndUpdate(); |
1280 |
Is it possible to show the non-working units up to minutes
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutUnitWidth(16); var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelNoLine); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutUnit(EXG2ANTTLib::exMinute); var_Level->PutCount(60); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute); var_Chart->PutResizeUnitCount(15); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Non-Working")))->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,_bstr_t("weekday(value) case (default:((timeF(value)>=\"12:30:00\" and timeF(value) <=\"14:00:00\" ));5:( timeF(value)>=\"12:30:00\" and") + " timeF(value) <=\"13:30:00\" );6:1;0:1) "); h = var_Items->AddItem("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,_bstr_t("weekday(value) case (default:((timeF(value)>=\"10:45:00\" and timeF(value) <=\"13:45:00\" ));5:( timeF(value)>=\"10:45:00\" and") + " timeF(value) <=\"14:30:00\" );6:1;0:1) "); h = var_Items->AddItem("2:30 to 9:30 on Friday, Saturday and Sunday"); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) case (default:((timeF(value)>=\"02:30:00\" and timeF(value) <=\"09:30:00\" ));1:0;2:0;3:0;4:0) "); spG2antt1->EndUpdate(); |
1279 |
Is it possible to define several type of progress bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Progress",L"ProgressT"); var_Bar->PutColor(RGB(255,0,0)); var_Bar->PutShape(EXG2ANTTLib::exShapeSolid); var_Bar->PutHeight(7); var_Chart->GetBars()->Add(L"Task%ProgressT:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Progress"); var_Bar1->PutColor(RGB(0,0,255)); var_Bar1->PutShape(EXG2ANTTLib::exShapeSolidUp); var_Chart->GetBars()->Add(L"Summary%Progress")->PutShortcut(L"Summary"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Project"); var_Items->PutItemHeight(h,16); var_Items->PutCellValue(h,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE()); var_Items->PutCellValue(h,long(2),COleDateTime(2006,10,3,0,00,00).operator DATE()); var_Items->AddBar(h,"Summary",var_Items->GetCellValue(h,long(1)),var_Items->GetCellValue(h,long(2)),"sum",vtMissing); var_Items->PutItemBar(h,"sum",EXG2ANTTLib::exBarPercent,double(0.4)); var_Items->PutItemBar(h,"sum",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); long h1 = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutCellValue(h1,long(1),var_Items->GetCellValue(h,long(1))); var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,27,0,00,00).operator DATE()); var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),"K1",vtMissing); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarPercent,double(0.6)); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); long h2 = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellValue(h2,long(1),var_Items->GetCellValue(h1,long(2))); var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,28,0,00,00).operator DATE()); var_Items->AddBar(h2,"Unknown",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellValue(h3,long(1),var_Items->GetCellValue(h2,long(2))); var_Items->PutCellValue(h3,long(2),var_Items->GetCellValue(h,long(2))); var_Items->AddBar(h3,"Task",var_Items->GetCellValue(h3,long(1)),var_Items->GetCellValue(h3,long(2)),"K3",vtMissing); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarPercent,double(0.65)); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarPercentColor,long(32768)); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->GroupBars(h1,"K1",VARIANT_FALSE,h2,"K2",VARIANT_TRUE,long(31),"0;4"); var_Items->GroupBars(h2,"K2",VARIANT_FALSE,h3,"K3",VARIANT_TRUE,long(31),"0;2"); var_Items->DefineSummaryBars(h,"sum",h1,"K1"); var_Items->DefineSummaryBars(h,"sum",h2,"K2"); var_Items->DefineSummaryBars(h,"sum",h3,"K3"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1278 |
Is it possible to display the percent bar over the summary bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Progress"); var_Bar->PutColor(RGB(0,0,255)); var_Bar->PutShape(EXG2ANTTLib::exShapeSolidUp); var_Chart->GetBars()->Add(L"Summary%Progress")->PutShortcut(L"SummaryP"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Summary"); var_Items->AddBar(h,"SummaryP",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.4)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1277 |
How can I display the percent value in the lower side of the bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Progress"); var_Bar->PutShape(EXG2ANTTLib::exShapeSolid); var_Bar->PutHeight(7); var_Bar->PutColor(RGB(0,0,255)); var_Chart->GetBars()->Add(L"Task%Progress")->PutShortcut(L"Percent"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Percent",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.5)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarVAlignPercent,long(2)); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Percent",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing); spG2antt1->EndUpdate(); |
1276 |
Is it possible to change the percent's height
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Progress"); var_Bar->PutShape(EXG2ANTTLib::exShapeSolid); var_Bar->PutHeight(7); var_Chart->GetBars()->Add(L"Task%Progress"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task%Progress",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.5)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1275 |
How can I change the pattern for the percent bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Progress"); var_Bar->PutPattern(EXG2ANTTLib::exPatternBDiagonal); var_Bar->PutShape(EXG2ANTTLib::exShapeSolid); var_Bar->PutColor(RGB(196,0,0)); var_Chart->GetBars()->Add(L"Task%Progress"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task%Progress",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.4)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1274 |
How can I change the look for the percent bar using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\hot.ebn"); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Progress"); var_Bar->PutColor(0x1000000); var_Bar->PutShape(EXG2ANTTLib::exShapeSolid); var_Bar->PutHeight(7); var_Chart->GetBars()->Add(L"Task%Progress"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task%Progress",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.4)); spG2antt1->EndUpdate(); |
1273 |
Is it possible to align the percent bar to the bottom of the bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutHeight(28); var_Chart->GetBars()->Add(L"Task%Progress")->PutShortcut(L"Percent"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Percent",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K1","text inside"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarVAlignCaption,long(0)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.75)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercentCaptionFormat,"%p%"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarVAlignPercent,long(2)); spG2antt1->EndUpdate(); |
1272 |
Is it possible to show the percent on the bottom side of the bar, so I can leave the text upside
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars(); var_Bars->GetItem("Task")->PutHeight(28); EXG2ANTTLib::IBarPtr var_Bar = var_Bars->GetItem("Progress"); var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown); var_Bar->PutHeight(20); var_Bar->PutColor(RGB(0,0,255)); var_Bars->Add(L"Task%Progress")->PutShortcut(L"Percent"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Percent",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K1","text inside"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarVAlignCaption,long(0)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,double(0.75)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercentCaptionFormat,"<br>%p%"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(1)); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarCanResizePercent,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1271 |
Is it possible to assign a multiple lines labels/captions to a bar
|
1270 |
Does your control supports multiple lines tooltip
|
1269 |
It is possible to write the word in red/color or to add a tooltip or a link to the word
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,26,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,32); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1","some <fgcolor=FF0000>red</fgcolor> text"); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarCanResize,VARIANT_FALSE); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarToolTip,"And here goes the <b>tooltip</b> of the text. "); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h2,"K2",EXG2ANTTLib::exBarToolTip,"And here goes the <b>tooltip</b> of the bar. "); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L<b>inke</b>d to a bar"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkToolTip,"And here goes the <b>tooltip</b> of the link. "); |
1268 |
It is possible to use seconds/minutes/hours as time scale in your control, but using my regional settings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLabel(EXG2ANTTLib::exMonth,L"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>"); var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256"); var_Chart->PutLabel(EXG2ANTTLib::exDay,_bstr_t("<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d") + "%>, <%yyyy%><||><||>4096"); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%") + "> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutLabel(EXG2ANTTLib::exMinute,_bstr_t("<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> ") + "<%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->PutLabel(EXG2ANTTLib::exSecond,_bstr_t("<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>") + "<|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMonth,L"<%loc_mmmm%>/<%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exWeek,L"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exDay,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exHour,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMinute,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exSecond,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); EXG2ANTTLib::IChartPtr var_Chart1 = spG2antt1->GetChart(); var_Chart1->PutPaneWidth(VARIANT_FALSE,0); var_Chart1->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart1->PutLevelCount(4); var_Chart1->GetLevel(0)->PutLabel(long(4096)); var_Chart1->GetLevel(1)->PutLabel(long(65536)); var_Chart1->GetLevel(2)->PutLabel(long(1048576)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart1->GetLevel(3); var_Level->PutCount(15); var_Level->PutLabel(long(16777216)); spG2antt1->EndUpdate(); |
1267 |
The chart's header is displayed in English. Can I change so it is the same as in my regional settings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLabel(EXG2ANTTLib::exMonth,L"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>"); var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256"); var_Chart->PutLabel(EXG2ANTTLib::exDay,_bstr_t("<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d") + "%>, <%yyyy%><||><||>4096"); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%") + "> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutLabel(EXG2ANTTLib::exMinute,_bstr_t("<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> ") + "<%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->PutLabel(EXG2ANTTLib::exSecond,_bstr_t("<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>") + "<|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMonth,L"<%loc_mmmm%>/<%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exWeek,L"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exDay,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exHour,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMinute,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exSecond,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); EXG2ANTTLib::IChartPtr var_Chart1 = spG2antt1->GetChart(); var_Chart1->PutPaneWidth(VARIANT_FALSE,0); var_Chart1->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart1->PutLevelCount(2); var_Chart1->PutUnitScale(EXG2ANTTLib::exDay); spG2antt1->EndUpdate(); |
1266 |
It is possible to use seconds/minutes/hours as time scale in your control
|
1265 |
Is it possible to resize chart's column/level using the mouse as we can for the columns, but do not want to resize up to hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,32); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE()); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); var_Chart->PutAllowResizeInsideZoom(VARIANT_TRUE); var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat(); var_InsideZoomFormat->PutOwnerLabel(L"<%d%>"); var_InsideZoomFormat->PutInsideLabel(L""); var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exHour); var_InsideZoomFormat->PutInsideCount(24); var_InsideZoomFormat->PutDrawTickLines(VARIANT_FALSE); var_InsideZoomFormat->PutDrawGridLines(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms(); var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE); var_InsideZooms->PutDefaultWidth(18); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
1264 |
Is it possible to resize chart's column/level using the mouse as we can for the columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,32); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE()); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); var_Chart->PutAllowResizeInsideZoom(VARIANT_TRUE); var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat(); var_InsideZoomFormat->PutOwnerLabel(L"<%d%>"); var_InsideZoomFormat->PutInsideLabel(L""); var_InsideZoomFormat->PutDrawTickLines(VARIANT_FALSE); var_InsideZoomFormat->PutDrawGridLines(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms(); var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE); var_InsideZooms->PutDefaultWidth(18); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
1263 |
How can I empty or clear the undo/redo queue
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowUndoRedo(VARIANT_TRUE); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,25,0,00,00).operator DATE(),"",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"",vtMissing); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); OutputDebugStringW( L"Clear undo/redo queue" ); spG2antt1->GetChart()->PutAllowUndoRedo(VARIANT_FALSE); spG2antt1->GetChart()->PutAllowUndoRedo(VARIANT_TRUE); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); spG2antt1->EndUpdate(); |
1262 |
How can I remove the undo/redo queue
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowUndoRedo(VARIANT_TRUE); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,25,0,00,00).operator DATE(),"",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"",vtMissing); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); OutputDebugStringW( L"Clear undo/redo queue" ); spG2antt1->GetChart()->UndoRemoveAction(vtMissing,vtMissing); spG2antt1->GetChart()->RedoRemoveAction(vtMissing,vtMissing); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); spG2antt1->EndUpdate(); |
1261 |
Is it possible to prevent adding an undo operation for instance the RemoveLink(LinkKey) I call during the AddLink event
// AddLink event - Occurs when the user links two bars using the mouse. void OnAddLinkG2antt1(LPCTSTR LinkKey) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->RemoveLink(LinkKey); spG2antt1->GetChart()->UndoRemoveAction(long(10),long(1)); spG2antt1->GetChart()->UndoRemoveAction(long(11),long(1)); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); } // ChartEndChanging event - Occurs after the chart has been changed. void OnChartEndChangingG2antt1(long Operation) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( spG2antt1->GetChart()->GetUndoListAction(vtMissing,vtMissing) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowUndoRedo(VARIANT_TRUE); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,25,0,00,00).operator DATE(),"",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1260 |
Is it possible to rename the links from "Link1" to my choice
// AddLink event - Occurs when the user links two bars using the mouse. void OnAddLinkG2antt1(LPCTSTR LinkKey) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->PutLink(LinkKey,EXG2ANTTLib::exLinkKey,"newIDlink"); } // MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetLinkFromPoint(-1,-1)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,25,0,00,00).operator DATE(),"",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1259 |
How can I prevent highlighting the column from the cursor - point
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJ") + "gEgI="); spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,0x1000000); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"E1")))->PutWidth(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"E2")))->PutWidth(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"E3")))->PutWidth(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"E4")))->PutWidth(32); |
1258 |
Is it possible to specify the background color for the item in the chart part only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); spG2antt1->GetChart()->PutItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1257 |
Is it possible to apply different visual appearance, color, sizes for item in the list and chart part
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spG2antt1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spG2antt1->GetVisualAppearance()->Add(3,"CP:2 2 2 -2 -2"); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,0x1ffff00); spG2antt1->GetChart()->PutItemBackColor(hC,0x300ff00); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1256 |
How do I change the visual appearance for the entire item, using your EBN technology
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,0x1000000); spG2antt1->GetChart()->PutItemBackColor(hC,0x1000000); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1255 |
is it possible to specify the a different background color for the item, list and chart part
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,RGB(255,0,0)); spG2antt1->GetChart()->PutItemBackColor(hC,RGB(255,255,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1254 |
Is it possible to specify the background color for the entire row, including the chart part
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,RGB(255,0,0)); spG2antt1->GetChart()->PutItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1253 |
Is it possible to prevent overlaying the bars while moving or resizing the bars, so they get arranged once the bar is moved or resized
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutOverlaidOnMoving(VARIANT_FALSE); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(""); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A3",vtMissing); spG2antt1->EndUpdate(); |
1252 |
Is it possible display numbers in the same format no matter of regional settings in the control panel
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default positive)'"); h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')"); h = var_Items->AddItem(double(-100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default negative)'"); h = var_Items->AddItem(double(-100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')"); spG2antt1->EndUpdate(); |
1251 |
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(0.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(0.27)); var_Items->PutFormatCell(h,long(0),L"(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'"); spG2antt1->EndUpdate(); |
1250 |
How can I specify the format for negative numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(-100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(-100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"); spG2antt1->EndUpdate(); |
1249 |
Is it possible to change the grouping character when display numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'"); spG2antt1->EndUpdate(); |
1248 |
How can I display numbers with 2 digits in each group
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(100000.27)); var_Items->PutFormatCell(h,long(0),L"(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"); spG2antt1->EndUpdate(); |
1247 |
How can I display my numbers using a different decimal separator
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"); spG2antt1->EndUpdate(); |
1246 |
Is it possible to display the numbers using 3 (three) digits
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format '3') + ' <fgcolor=808080>(3 digits)'"); h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format 2) + ' <fgcolor=808080>(2 digits)'"); h = var_Items->AddItem(double(100.27)); var_Items->PutFormatCell(h,long(0),L"(value format 1) + ' <fgcolor=808080>(1 digit)'"); spG2antt1->EndUpdate(); |
1245 |
Is it possible to format numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSelBackColor(spG2antt1->GetBackColor()); spG2antt1->PutSelForeColor(spG2antt1->GetForeColor()); spG2antt1->PutShowFocusRect(VARIANT_TRUE); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Name"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"A"))); var_Column->PutSortType(EXG2ANTTLib::SortNumeric); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(36); var_Column->PutFormatColumn(L"len(value) ? value + ' +'"); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"B"))); var_Column1->PutSortType(EXG2ANTTLib::SortNumeric); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(36); var_Column1->PutFormatColumn(L"len(value) ? value + ' +'"); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C"))); var_Column2->PutSortType(EXG2ANTTLib::SortNumeric); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutWidth(36); var_Column2->PutFormatColumn(L"len(value) ? value + ' ='"); var_Column2->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"A+B+C"))); var_Column3->PutSortType(EXG2ANTTLib::SortNumeric); var_Column3->PutWidth(64); var_Column3->PutComputedField(L"dbl(%1)+dbl(%2)+dbl(%3)"); var_Column3->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") + "00FF>+'+(value format '2|.|3|,' ): '0.00') )"); var_Column3->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->PutCellValueFormat(h,long(4),EXG2ANTTLib::exComputedField); long h1 = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutCellValue(h1,long(1),long(7)); var_Items->PutCellValue(h1,long(2),long(3)); var_Items->PutCellValue(h1,long(3),long(1)); h1 = var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutCellValue(h1,long(1),long(-2)); var_Items->PutCellValue(h1,long(2),long(-2)); var_Items->PutCellValue(h1,long(3),long(-4)); h1 = var_Items->InsertItem(h,vtMissing,"Child 3"); var_Items->PutCellValue(h1,long(1),long(2)); var_Items->PutCellValue(h1,long(2),long(2)); var_Items->PutCellValue(h1,long(3),long(-4)); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1244 |
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),"",long(2),"4","-4"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,11,0,00,00).operator DATE(),"C","C"); var_Items->GroupBars(h,"A",VARIANT_FALSE,h,"B",VARIANT_TRUE,long(39),vtMissing); var_Items->GroupBars(h,"B",VARIANT_FALSE,h,"C",VARIANT_TRUE,long(39),vtMissing); spG2antt1->EndUpdate(); |
1243 |
How can I set the column's width to my desired width
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"A")))->PutWidth(128); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"B")))->PutWidth(128); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); |
1242 |
Is it possible to prevent intersection of three bars or more
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,11,0,00,00).operator DATE(),"C","C"); var_Items->GroupBars(h,"A",VARIANT_FALSE,h,"B",VARIANT_TRUE,long(39),vtMissing); var_Items->GroupBars(h,"B",VARIANT_FALSE,h,"C",VARIANT_TRUE,long(39),vtMissing); spG2antt1->EndUpdate(); |
1241 |
Is it possible to prevent intersection of two bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); var_Items->GroupBars(h,"A",VARIANT_FALSE,h,"B",VARIANT_TRUE,long(39),vtMissing); spG2antt1->EndUpdate(); |
1240 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->GetColumns()->Add(L"Value"); spG2antt1->GetColumns()->Add(L"FormatCell"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(long(1)); var_Items->PutCellValue(h,long(1),long(12)); var_Items->PutFormatCell(h,long(1),L"currency(value)"); h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->PutCellValueFormat(h,long(1),EXG2ANTTLib::exHTML); var_Items->PutFormatCell(h,long(1),L"longdate(value) replace '2001' with '<b>2001</b>'"); spG2antt1->EndUpdate(); |
1239 |
How can I simulate displaying groups
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Name"); var_Columns->Add(L"A"); var_Columns->Add(L"B"); var_Columns->Add(L"C"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Group 1"); var_Items->PutCellHAlignment(h,long(0),EXG2ANTTLib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXG2ANTTLib::DividerBoth); var_Items->PutItemHeight(h,24); var_Items->PutSortableItem(h,VARIANT_FALSE); long h1 = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutCellValue(h1,long(1),long(1)); var_Items->PutCellValue(h1,long(2),long(2)); var_Items->PutCellValue(h1,long(3),long(3)); h1 = var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutCellValue(h1,long(1),long(4)); var_Items->PutCellValue(h1,long(2),long(5)); var_Items->PutCellValue(h1,long(3),long(6)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Group 2"); var_Items->PutCellHAlignment(h,long(0),EXG2ANTTLib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXG2ANTTLib::DividerBoth); var_Items->PutItemHeight(h,24); var_Items->PutSortableItem(h,VARIANT_FALSE); h1 = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutCellValue(h1,long(1),long(1)); var_Items->PutCellValue(h1,long(2),long(2)); var_Items->PutCellValue(h1,long(3),long(3)); h1 = var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutCellValue(h1,long(1),long(4)); var_Items->PutCellValue(h1,long(2),long(5)); var_Items->PutCellValue(h1,long(3),long(6)); var_Items->PutExpandItem(h,VARIANT_TRUE); |
1238 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Name"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Values"))); var_Column->PutSortType(EXG2ANTTLib::SortNumeric); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(64); var_Column->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"); var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->PutFormatCell(h,long(1),L"'<none>'"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10)); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(15)); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(25)); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1237 |
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Name"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Values"))); var_Column->PutSortType(EXG2ANTTLib::SortNumeric); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(64); var_Column->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"); var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->PutFormatCell(h,long(1),L" "); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10)); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(15)); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(25)); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1236 |
I have a right-aligned column with check-boxes with no text, but it is not perfectly aligned. Is there something I can do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutTreeColumnIndex(-1); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutShowFocusRect(VARIANT_FALSE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Default-Right"))); var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutAlignment(EXG2ANTTLib::RightAlignment); var_Column->PutHeaderAlignment(EXG2ANTTLib::RightAlignment); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Custom-Right"))); var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"icon,icons,picture,caption,check"); var_Column1->PutHeaderAlignment(EXG2ANTTLib::RightAlignment); var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(vtMissing); var_Items->AddItem(vtMissing); var_Items->AddItem(vtMissing); spG2antt1->EndUpdate(); |
1235 |
How can I specify that once I move or resize a bar other should be automatically moved/resized
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Tasks"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->PutCellValue(h1,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE()); var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE()); var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),"",vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->PutCellValue(h2,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE()); var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE()); var_Items->AddBar(h2,"Task",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),"",vtMissing); var_Items->GroupBars(h1,"",VARIANT_TRUE,h2,"",VARIANT_TRUE,vtMissing,vtMissing); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_FALSE,vtMissing,vtMissing); spG2antt1->EndUpdate(); |
1234 |
How can I specify that once I move a bar other should be automatically moved
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Tasks"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->PutCellValue(h1,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE()); var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE()); var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),"",vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->PutCellValue(h2,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE()); var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE()); var_Items->AddBar(h2,"Task",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),"",vtMissing); var_Items->GroupBars(h1,"",VARIANT_TRUE,h2,"",VARIANT_TRUE,long(3),vtMissing); spG2antt1->EndUpdate(); |
1233 |
Is it possible to include the bar's caption in overlaying
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutOverlaidGroup(L"Milestone"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1","task"); var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"M","milestone"); var_Items->PutItemBar(h,"M",EXG2ANTTLib::exBarHAlignCaption,long(18)); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A1","task"); var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"M","milestone"); var_Items->PutItemBar(h,"M",EXG2ANTTLib::exBarHAlignCaption,long(18)); spG2antt1->EndUpdate(); |
1232 |
Sometimes, the milestone bars are not overlaying the task bars. What I am doing wrong
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutOverlaidGroup(L"Milestone"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"M",vtMissing); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"M",vtMissing); spG2antt1->EndUpdate(); |
1231 |
Is it possible to add milestone bars in the same overlaid group as task is
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutOverlaidGroup(L"Milestone"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"M",vtMissing); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"M",vtMissing); spG2antt1->EndUpdate(); |
1230 |
When adding a date column and setting the SortType to SortTypeEnum.SortDateTime, the column still sorts as a string. What am I doing wrong
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutSortType(EXG2ANTTLib::SortDateTime); spG2antt1->GetColumns()->Add(L"String"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); h = var_Items->AddItem(COleDateTime(2001,1,11,0,00,00).operator DATE()); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); h = var_Items->AddItem(COleDateTime(2001,1,2,0,00,00).operator DATE()); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortDescending); spG2antt1->EndUpdate(); |
1229 |
Is it possible to move an item from a parent to another
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->InsertItem(var_Items->AddItem("C"),"","D"); var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),var_Items->GetFindItem("A",long(0),vtMissing)); spG2antt1->EndUpdate(); |
1228 |
How can I change the identation for an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->InsertItem(var_Items->AddItem("C"),"","D"); var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),0); spG2antt1->EndUpdate(); |
1227 |
Moving the bars fail if I am using GroupBars, exBarCanResize on 0 and exBarKeepWorkingCount on True ( bars keeps the working units and at runtime user can not resize them ). Is it possible to use the GroupBars while user should not be able to resize the bars at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarCanResize,long(4)); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarCanResize,long(4)); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(95),"2"); spG2antt1->EndUpdate(); |
1226 |
How can I collapse all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(0,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1225 |
How can I expand all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1224 |
How can I specify the distance between bars to be in a specified range of working units
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(95),"0;1;5"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1223 |
How can I specify the distance between bars to be in a specified range
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(31),"0;1;7"); spG2antt1->EndUpdate(); |
1222 |
How can I specify the distance between bars to be no more than a specified value in working units
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(95),"0;0;2"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1221 |
How can I specify the distance between bars to be no more than a specified value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(31),"0;0;2"); spG2antt1->EndUpdate(); |
1220 |
How can I specify the distance between bars to be no less than a specified value in working units
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitIntervalMin + exLimitIntervalTreatAsWorking"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(79),"2"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1219 |
How can I specify the distance between bars to be no less than a specified value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitIntervalMin"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(15),"2"); spG2antt1->EndUpdate(); |
1218 |
How do I specify the distance between bars to be exactly the specified value in working units
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(95),"2"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1217 |
How do I specify the distance between bars to be exactly the specified value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","A"); var_Items->AddItem(""); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Unknown",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"","B"); var_Items->AddLink("L1",h1,"",h2,""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"exPreserveBarLength + exIgnoreOriginalInterval"); var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(7),"2"); spG2antt1->EndUpdate(); |
1216 |
How do I specify the day's duration to be working only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->GetChart()->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1215 |
How do I specify the the user can't resize the bar at left side ( starting point )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->GetChart()->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","not resizable on left"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1214 |
How do I specify the the user can't resize the bar at left side ( starting point )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","not resizable on left"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarCanResize,long(2)); spG2antt1->EndUpdate(); |
1213 |
How do I specify the the user can't resize the bar at right side ( ending point )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","not resizable on right"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarCanResize,long(1)); spG2antt1->EndUpdate(); |
1212 |
How do I specify the the user can't resize the bar at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","not resizable"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarCanResize,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1211 |
How do I specify the day's duration to be at least a specified length
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","> 2 Days"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarMinDuration,long(2)); spG2antt1->EndUpdate(); |
1210 |
How do I specify the day's duration to be maximum a specified length
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"A","< 3 Days"); var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarMaxDuration,long(3)); spG2antt1->EndUpdate(); |
1209 |
I am trying to construct a timeline that is not date specific. My timeline starts at T=00:00:00 and then increases by 5 seconds. Is it possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(long(0)); var_Chart->PutUnitWidth(48); var_Chart->PutNonworkingDays(0); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%hh%>:<%nn%>:<%ss%>"); var_Level->PutUnit(EXG2ANTTLib::exSecond); var_Level->PutCount(5); |
1208 |
How can I specify the levels using the user's Regional and Language Options
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetFont()->PutName(L"Arial Unicode MS"); spG2antt1->PutHeaderHeight(36); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2010,5,30,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutUnitWidth(36); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<b><%loc_mmmm%></b> <%yyyy%><br><%loc_sdate%><r> <%ww%> "); var_Level->PutToolTip(var_Level->GetLabel()); var_Level->PutUnit(EXG2ANTTLib::exWeek); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel("<%loc_ddd%><br><%d%>"); var_Level1->PutToolTip(var_Level1->GetLabel()); var_Chart->PutToolTip(L"<%loc_ldate%>"); spG2antt1->EndUpdate(); |
1207 |
How do I arrange, format or layout the item on multiple levels or lines, as a subform
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines); spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderHidden); spG2antt1->PutItemsAllowSizing(EXG2ANTTLib::exResizeItem); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->PutBackColor(RGB(255,255,255)); spG2antt1->PutSelBackColor(RGB(255,255,255)); spG2antt1->PutSelForeColor(0x80000012); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L""); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column->PutVisible(VARIANT_FALSE); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column1->PutVisible(VARIANT_FALSE); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DropDownType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column2->PutVisible(VARIANT_FALSE); var_Column2->GetEditor()->PutEditType(EXG2ANTTLib::DropDownType); EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column3->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IEditorPtr var_Editor = var_Column3->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::CheckValueType); var_Editor->PutOption(EXG2ANTTLib::exCheckValue2,long(1)); EXG2ANTTLib::IColumnPtr var_Column4 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column4->PutVisible(VARIANT_FALSE); var_Column4->GetEditor()->PutEditType(EXG2ANTTLib::DateType); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IColumnPtr var_Column5 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column5->PutVisible(VARIANT_FALSE); var_Column5->GetEditor()->PutEditType(EXG2ANTTLib::DropDownType); EXG2ANTTLib::IColumnPtr var_Column6 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column6->PutVisible(VARIANT_FALSE); var_Column6->PutDef(EXG2ANTTLib::exCellSingleLine,long(0)); var_Editor = var_Column6->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::MemoType); var_Editor->PutButtonWidth(17); var_Editor->PutOption(EXG2ANTTLib::exDownArrow,long(0)); var_Editor->PutOption(EXG2ANTTLib::exEndKey,long(0)); var_Editor->PutOption(EXG2ANTTLib::exHomeKey,long(0)); var_Editor->PutOption(EXG2ANTTLib::exLeftArrow,long(0)); var_Editor->PutOption(EXG2ANTTLib::exMemoAutoSize,long(0)); var_Editor->PutOption(EXG2ANTTLib::exMemoVScrollBar,long(-1)); var_Editor->PutOption(EXG2ANTTLib::exPageDownKey,long(0)); var_Editor->PutOption(EXG2ANTTLib::exPageUpKey,long(0)); var_Editor->PutOption(EXG2ANTTLib::exRightArrow,long(0)); var_Editor->PutOption(EXG2ANTTLib::exUpArrow,long(0)); var_Column6->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem(""); var_Items->PutCellValue(h0,long(9),"Dismiss"); var_Items->PutCellFormatLevel(h0,long(0),_bstr_t("12;\" \"[b=0][bg=RGB(248,248,248)]/(\" \"[b=0][bg=RGB(248,248,248)]:12,(1;\" \"[b=0]/(\" \"[b=0]:1,(25;(5;\" \"[b=0]/((\"Subjec") + "t:\"[b=0]:80,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,(\" \"[b=0][bg=RGB(255,0,0)]:5,1[b=0]),\" \"[b=0][bg=RGB(" + "0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]))/1;\" \"[b=0]))/20;(\"Location:\"[b=0]:80,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RG" + "B(0,0,0)]:1,2[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]),((\" \"[b=0]:10,\"Label:\"[b=0])):50,(1;\" \"[b=0][" + "bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,3[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]))/50;(10;\" \"[b=0]/" + "(1;\" \"[b=0][bg=RGB(255,0,0)]/(\"Recurrence:\"[b=0]:80,\"Occurs every day effective 20/04/2007 from 01:00 to 01:01.\"[b=0])/1;\" + "" \"[b=0][bg=RGB(255,0,0)])/10;\" \"[b=0])/23;(4[b=0]:20,\"Reminder:\"[b=0]:60,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0" + ",0,0)]:1,5[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]),((\" \"[b=0]:5,6[b=0])):30,((\" \"[b=0]:10,\"Show time" + " as:\"[b=0])):90,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,7[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=R" + "GB(0,0,0)]))/(12;\" \"[b=0]/(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,8[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \" + ""[b=0][bg=RGB(0,0,0)]))/35;(5;\" \"[b=0]/(\" \"[b=0],\" \"[b=0],((\" \"[b=0]:40,9[b=0])))/5;\" \"[b=0])),\" \"[b=0]:1)/1;\" \"[b" + "=0]),\" \"[b=0][bg=RGB(248,248,248)]:12)/12;\" \"[b=0][bg=RGB(248,248,248)]"); var_Items->PutCellHasCheckBox(h0,long(4),VARIANT_TRUE); var_Items->PutCellHasButton(h0,long(9),VARIANT_TRUE); var_Items->PutCellHAlignment(h0,long(9),EXG2ANTTLib::CenterAlignment); var_Items->PutCellVAlignment(h0,long(8),EXG2ANTTLib::exTop); var_Items->PutCellForeColor(h0,long(8),RGB(0,0,0)); var_Items->PutCellHasButton(h0,long(6),VARIANT_TRUE); var_Items->PutCellValue(h0,long(6),"<img>1</img>"); var_Items->PutCellValueFormat(h0,long(6),EXG2ANTTLib::exHTML); var_Items->PutCellHAlignment(h0,long(6),EXG2ANTTLib::CenterAlignment); var_Items->PutItemHeight(h0,296); spG2antt1->EndUpdate(); |
1206 |
How can I arrange the columns on multiple levels
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(48); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"FirstName")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"LastName")))->PutVisible(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Photo")))->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Address"))); var_Column->PutVisible(VARIANT_FALSE); var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Personal Info"))); var_Column1->PutFormatLevel(L"3:48,(0/1/2),4:96"); var_Column1->PutDef(EXG2ANTTLib::exCellFormatLevel,"3:48,(0/1/2),4:96"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); spG2antt1->GetChart()->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Sales Representative"); var_Items->PutCellValue(h,long(1),"Nancy"); var_Items->PutCellValue(h,long(2),"Davolio"); var_Items->PutCellPicture(h,long(3),((IDispatch*)(spG2antt1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))); var_Items->PutCellValue(h,long(4),"507-20th Ave. E.Apt. 2A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,1,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),long(2),long(2)); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),long(1),long(1)); spG2antt1->EndUpdate(); |
1205 |
Is it possible to display a bar only using a gradient color using the exBarColor option
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutStartColor(RGB(255,255,255)); var_Bar->PutEndColor(var_Bar->GetStartColor()); var_Bar->PutHeight(17); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Gradient"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(227)); h = var_Items->AddItem("W/h Color"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(227)); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1204 |
Is it possible to display a bar only using a gradient color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutStartColor(RGB(255,255,255)); var_Bar->PutEndColor(var_Bar->GetStartColor()); var_Bar->PutHeight(17); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Gradient"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(227)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1203 |
Is it possible to display a bar only using a gradient color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutStartColor(RGB(255,255,255)); var_Bar->PutEndColor(var_Bar->GetColor()); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Gradient"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(99)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1202 |
How can I display a specified bar only with a thicker border
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Border"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(4099)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
1201 |
Is it possible to display the shadow for a specified bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Shadow"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(8195)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |